package com.ruoyi.facilities.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.facilities.mapper.TfNoisegcMapper;
import com.ruoyi.facilities.domain.TfNoisegc;
import com.ruoyi.facilities.service.ITfNoisegcService;

/**
 * 噪声治理设施Service业务层处理
 * 
 * @author yxf
 * @date 2021-08-10
 */
@Service
public class TfNoisegcServiceImpl implements ITfNoisegcService 
{
    @Autowired
    private TfNoisegcMapper tfNoisegcMapper;

    /**
     * 查询噪声治理设施
     * 
     * @param nsId 噪声治理设施ID
     * @return 噪声治理设施
     */
    @Override
    public TfNoisegc selectTfNoisegcById(Long nsId)
    {
        return tfNoisegcMapper.selectTfNoisegcById(nsId);
    }

    /**
     * 查询噪声治理设施列表
     * 
     * @param tfNoisegc 噪声治理设施
     * @return 噪声治理设施
     */
    @Override
    public List<TfNoisegc> selectTfNoisegcList(TfNoisegc tfNoisegc)
    {
        return tfNoisegcMapper.selectTfNoisegcList(tfNoisegc);
    }

    /**
     * 新增噪声治理设施
     * 
     * @param tfNoisegc 噪声治理设施
     * @return 结果
     */
    @Override
    public int insertTfNoisegc(TfNoisegc tfNoisegc)
    {
        tfNoisegc.setCreateTime(DateUtils.getNowDate());
        return tfNoisegcMapper.insertTfNoisegc(tfNoisegc);
    }

    /**
     * 修改噪声治理设施
     * 
     * @param tfNoisegc 噪声治理设施
     * @return 结果
     */
    @Override
    public int updateTfNoisegc(TfNoisegc tfNoisegc)
    {
        tfNoisegc.setUpdateTime(DateUtils.getNowDate());
        return tfNoisegcMapper.updateTfNoisegc(tfNoisegc);
    }

    /**
     * 批量删除噪声治理设施
     * 
     * @param nsIds 需要删除的噪声治理设施ID
     * @return 结果
     */
    @Override
    public int deleteTfNoisegcByIds(Long[] nsIds)
    {
        return tfNoisegcMapper.deleteTfNoisegcByIds(nsIds);
    }

    /**
     * 删除噪声治理设施信息
     * 
     * @param nsId 噪声治理设施ID
     * @return 结果
     */
    @Override
    public int deleteTfNoisegcById(Long nsId)
    {
        return tfNoisegcMapper.deleteTfNoisegcById(nsId);
    }
}
